package com.mywork.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mywork.dao.RegisterMapper;
import com.mywork.dao.RegisterViewMapper;
import com.mywork.po.Page;
import com.mywork.po.Register;
import com.mywork.po.RegisterView;

@Service
public class RegisterService {
	@Autowired
	RegisterMapper registerDao;
	
	@Autowired
	RegisterViewMapper registerViewDao;
	public void insert(Register register) {
		// TODO 自动生成的方法存根
		registerDao.insert(register);
	}

	public List<RegisterView> getAllregister(Page page) {
		// TODO 自动生成的方法存根
		return registerViewDao.selectAllRegister(page.getPageNo()*page.getPageSize(),page.getPageSize());
	}

	public int getCountOfAllRegister() {
		// TODO 自动生成的方法存根
		return registerViewDao.getCountOfAllRegister();
	}
	
}
